package com.expressage.service.impl;

import com.expressage.dao.RoleDao;
import com.expressage.po.Role;
import com.expressage.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleDao roleDao;
    @Override
    public List<Role> findAll() {
        return roleDao.findAll();
    }

    @Override
    public Role findByid(int rid) {
        return roleDao.findByid(rid);
    }

    @Override
    public boolean delete(int[] array) {
        return roleDao.delete(array)>0?true:false;
    }

    @Override
    public boolean add(Role role) {
        return roleDao.add(role)>0?true:false;
    }

    @Override
    public boolean update(Role role) {
        return roleDao.updata(role)>0?true:false;
    }
}
